#!/bin/bash
# Copyright 2020-2022, Huawei Technologies Co. Ltd.
#
# ALL RIGHTS RESERVED
#
# Compile media/hal project, this is the entrance script

# error out on errors
set -e
OUT_DIR="$1"

function main(){
    CUR_DIR=$(cd $(dirname "$0");pwd)

    cp -rf $CUR_DIR/videodisplayer/libhdi_videodisplayer.so $OUT_DIR/

    # Base on hi3516dv300, need update
    cp -rf $CUR_DIR/camera/libs/libhdi_camera.so $OUT_DIR/
    cp -rf $CUR_DIR/codec/libs/libcodec.so $OUT_DIR/
    cp -rf $CUR_DIR/audio/libs/libaudio_hw.so $OUT_DIR/
    cp -rf $CUR_DIR/audio/libs/libaudio_input_port.so $OUT_DIR/
    cp -rf $CUR_DIR/audio/libs/libaudio_output_port.so $OUT_DIR/
    cp -rf $CUR_DIR/common/libmedia_hal_common.so $OUT_DIR/
    cp -rf $CUR_DIR/common/libsecurec.so $OUT_DIR/
}

main "$@"
